﻿/*
 * Created by SharpDevelop.
 * User: Vegard Berg
 * Date: 13.06.2011
 * Time: 20:42
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace MultiClip
{
	/// <summary>
	/// Description of MainForm.
	/// </summary>
	public partial class MainForm : Form
	{
		public MainForm()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		
		void Button1Click(object sender, EventArgs e)
		{
			Clipboard.SetText(textBox1.Text);
		}
		
		void Button2Click(object sender, EventArgs e)
		{
			Clipboard.SetText(textBox2.Text);
		}
		
		void Button3Click(object sender, EventArgs e)
		{
			Clipboard.SetText(textBox3.Text);
		}
		
		void Button4Click(object sender, EventArgs e)
		{
			Clipboard.SetText(textBox4.Text);
		}
		
		void Button5Click(object sender, EventArgs e)
		{
			string clip = Clipboard.GetText();
			textBox1.Text = clip;
		}
		
		void Button6Click(object sender, EventArgs e)
		{
			string clip = Clipboard.GetText();
			textBox2.Text = clip;
		}
		
		void Button7Click(object sender, EventArgs e)
		{
			string clip = Clipboard.GetText();
			textBox3.Text = clip;
		}
		
		void Button8Click(object sender, EventArgs e)
		{
			string clip = Clipboard.GetText();
			textBox4.Text = clip;
		}
		
		void ExitToolStripMenuItemClick(object sender, EventArgs e)
		{
			Application.Exit();
		}
		
		void AboutToolStripMenuItemClick(object sender, EventArgs e)
		{
			AboutForm About = new AboutForm();
			About.ShowDialog();
		}
		
		void ToolStripMenuItem1Click(object sender, EventArgs e)
		{
			Clipboard.SetText(textBox1.Text);
		}
		
		void ToolStripMenuItem2Click(object sender, EventArgs e)
		{
			Clipboard.SetText(textBox2.Text);
		}
		
		void ToolStripMenuItem3Click(object sender, EventArgs e)
		{
			Clipboard.SetText(textBox3.Text);
		}
		
		void ToolStripMenuItem4Click(object sender, EventArgs e)
		{
			Clipboard.SetText(textBox4.Text);
		}
		
		
		
		void SetTextFromClipboardToolStripMenuItemClick(object sender, EventArgs e)
		{
			string clip = Clipboard.GetText();
			textBox1.Text = clip;
		}
		
		void SetTextFromClipboardToolStripMenuItem1Click(object sender, EventArgs e)
		{
			string clip = Clipboard.GetText();
			textBox2.Text = clip;
		}
		
		void SetTextFromClipboardToolStripMenuItem2Click(object sender, EventArgs e)
		{
			string clip = Clipboard.GetText();
			textBox3.Text = clip;
		}
		
		void SetTextFromClipboardToolStripMenuItem3Click(object sender, EventArgs e)
		{
			string clip = Clipboard.GetText();
			textBox4.Text = clip;
		}
		
		void NotifyIcon1MouseDoubleClick(object sender, MouseEventArgs e)
		{
			if (this.WindowState == FormWindowState.Minimized) {
				this.WindowState = FormWindowState.Normal;
				this.ShowInTaskbar = true;
				goto end;
			}else if (this.WindowState == FormWindowState.Normal) {
				this.WindowState = FormWindowState.Minimized;
				this.ShowInTaskbar = false;
				goto end;
			}
		end: ;
		}
	}
}
